﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BilbilDAL;
using Common;
using Modles.Models;

namespace BilbilBLL
{
    public class ManageUserInfoServer
    {
        public ResponseTool GetUserInfos()
        {
            return ResponseTool.Succeed(new UserInfoDAL().GetUserInfos());
        }
        public ResponseTool DeleteUserInfos(int id)
        {
            if(id == 0) { return ResponseTool.Fail("id不能为空"); }
            if (new UserInfoDAL().DeleteUserInfos(id))
            {
                return ResponseTool.Succeed("删除成功");
            }
            else
            {
                return ResponseTool.Fail("删除失败");
            }
        }
    }
}
